home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 49
/
Aminet 49 (2002)(GTI - Schatztruhe)[!][Jun 2002].iso
/
Aminet
/
dev
/
gui
/
CIT.readme
< prev
next >
Wrap
Text File
|
2002-03-10
|
2KB
|
72 lines
Short: A C++ GUI dev system
Author: Svend@DaugaardPedersen.dk (Svend Daugaard Pedersen)
Uploader: Svend@DaugaardPedersen.dk (Svend Daugaard Pedersen)
Type: dev/gui
CIT version 4.0 (2002.03.10)
CIT is a C++ development system.
The purpose with CIT (C++ Intuition Tool) is twofold:
- to offer the programmer an easy way to create GUIs
- to offer the programmer the possibility to make event driven programs.
Here is a very simple example program that opens a window with a palette
gadget and a button (Quit) gadget and waits for the user to press Quit or
the windows close gadget:
#include <CITGroup.h>
#include <CITButton.h>
#include <CITPalette.h>
CITApp Application;
CITWorkbench DemoScreen;
CITWindow DemoWindow;
CITVGroup winGroup;
CITPalette palette;
CITButton quitButton;
void CloseEvent() { Application.Stop(); }
void QuitEvent(ULONG ID) { Application.Stop(); }
int main()
{
BOOL Error=FALSE;
// Build GUI
//
DemoScreen.InsObject(DemoWindow,Error);
DemoWindow.CloseGadget();
DemoWindow.SizeGadget();
DemoWindow.DepthGadget();
DemoWindow.Caption("CITPalette Demo");
DemoWindow.CloseEventHandler(CloseEvent);
DemoWindow.InsObject(winGroup,Error);
winGroup.SpaceOuter();
winGroup.InsObject(palette,Error);
palette.MinWidth(200);
palette.MinHeight(150);
palette.NumColours(256);
winGroup.InsObject(quitButton,Error);
quitButton.Text("Quit");
quitButton.MaxHeight(20);
quitButton.EventHandler(QuitEvent);
// Put the screen into Application to create the GUI and set up
// the event system
//
Application.InsObject(DemoScreen,Error);
if( Error ) return 10;
Application.Run(); // Will return when Quit or close gadget is pressed
return 0;
}